<?php
    session_start();
    $action         =   $_GET['action'];
    if($action=='login')
    {
        $user_name  =   $_POST['txtUser'];
        $password   =   $_POST['txtPass'];

        if($user_name == 'admin' && $password == 'admin'){
                $_SESSION['login']      =   "1";

        }
        echo "<script>window.location='../admin/index.php?action=mp&cate_id=1'</script>";
    }if($action=='logout')
    {
            unset($_SESSION['login']);;
            echo "<script>window.location='../web/'</script>";
    }

?>